import request from '@/api/request'




// 活动列表
function findAllRecommends(data) {
  return request({
    url: `/lejuAdmin/homeRecommend/findAllRecommends`,
    method: 'get',
    data
  })
}


// 删除限时活动
function delRecommend(recommendId) {
  return request({
    url: `/lejuAdmin/homeRecommend/delRecommend/${recommendId}`,
    method: 'DELETE',
  })
}

// 修改限时活动
function updateRecommend(data) {
  return request({
    url: `/lejuAdmin/homeRecommend/updateRecommend`,
    method: 'post',
    data
  })
}

// 添加限时活动
function addRecommend(data) {
  return request({
    url: `/lejuAdmin/homeRecommend/addRecommend`,
    method: 'post',
    data
  })
}


// 商品列表分页查询
function productsByPage(start, limit,data) {
  return request({
    url: `/lejuAdmin/product/productsByPage/${start}/${limit}`,
    method: 'post',
    data
  })
}


// 品牌列表
function findAllBrand(data) {
  return request({
    url: `/lejuAdmin/brand/findAllBrand`,
    method: 'get',
    data
  })
}






export default {
  findAllRecommends,
  updateRecommend,
  delRecommend,
  addRecommend,
  productsByPage,
  findAllBrand
}
